package models

import "gorm.io/gorm"

type Fresh struct {
	gorm.Model
	Name    string  `gorm:"type:varchar(20);not null" json:"name"`
	Title   string  `gorm:"type:varchar(50);not null" json:"title"`
	Price   float64 `gorm:"type:decimal(10,2);not null" json:"price"`
	Num     int     `gorm:"type:int(11);not null" json:"num"`
	ClassId int     `gorm:"type:int(11); not null" json:"class_id"`
}
type Class struct {
	gorm.Model
	Name string `gorm:"type:varchar(30);not null" json:"name"`
}
type FreshClass struct {
	Fresh
	ClassName string
}
